import re

def analyze_words(input_str):
    if len(input_str.strip()) == 0:
        print("???? ?????? ??? ???????")
        return
    
    words = input_str.split()
    total_words = len(words)
    upper_case_cyrillic = sum(1 for word in words if re.match("[?-??]", word[0]))
    latin_character = sum(1 for word in words if re.search("[a-zA-Z]", word))
    short_words = sum(1 for word in words if len(word) <= 3)
    words_with_hyphen = sum(1 for word in words if '-' in word)
    longest_word = max(words, key=len)
    
    print(f"???-?? ????: {total_words}")
    print(f"???-?? ???? ? ????????? ????????????? ?????: {upper_case_cyrillic}")
    print(f"???-?? ???? ?????????? ????????? ??????: {latin_character}")
    print(f"???-?? ???? ?? ??????????? 3 ???????: {short_words}")
    print(f"????? ??????? ?????: {longest_word}")
    print(f"????? ?????? ???????? ?????: {len(longest_word)}")
    print(f"???-?? ???? ? ??????? ??????? ??????? ?????: {words_with_hyphen}")

input_str = input("??????? ????? ????? ??????: ")
analyze_words(input_str)
